
package com.be.beadmin.design.repository;

import com.be.beadmin.design.entity.BomReview;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
* @author zmy
* @date 2023-08-29
**/
public interface BomReviewRepository extends JpaRepository<BomReview, String>, JpaSpecificationExecutor<BomReview> {
    BomReview findBomReviewByIdAndDelete(String id, Integer delete);

    BomReview findBomReviewById(String id);

    int countBomReviewByAndChangeStatusAndDelete(int status, int delete);

    List<BomReview> findBomReviewsByReviewMainId(String reviewMainId);

    BomReview findBomReviewByBomBeforeIdAndVersionAndVersionSecondAndDelete(String bomBeforeId, int version, Integer versionSecond, Integer delete);

    BomReview findBomReviewByBomBeforeIdAndVersionAndVersionSecondAndChangeStatusAndDelete(String bomBeforeId, int version, Integer versionSecond, int changeStatus, Integer delete);
}